<form id="pagerForm" method="post" action="<?php echo Yii::app()->createUrl('order/index');?>">
	<input type="hidden" name="pageNum" value="<?php echo $page['current'];?>" />
	<input type="hidden" name="numPerPage" value="<?php echo $page['numPerPage'];?>" />
	<input type="hidden" name="goods_name" value="<?php echo $page['goods_name'];?>" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<?php echo Yii::app()->createUrl('order/index');?>" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					<label>商品名称：</label><input type="text" name="goods_name" value="<?php if(!empty($page['goods_name'])){?><?php echo $page['goods_name'];?><?php }?>" />
				</td>
				<td>
					<label>下单时间：</label>
					<input type="text" name="order_date" class="date" size="30" dateFmt="yyyy-MM-dd" readonly="true" value="<?php echo $page['order_date']?>"/>
				</td>
				<td>
					<label>出游时间：</label>
					<input type="text" name="travel_date" class="date" size="30" dateFmt="yyyy-MM-dd" readonly="true" value="<?php echo $page['travel_date']?>"/>
				</td>
				<td>
					<select class="combox" name="pay_status">
						<option value="">全部订单</option>
						<option value="1" <?php if($page['pay_status'] == "1"){?>selected<?php }?>>未&nbsp;&nbsp;支&nbsp;&nbsp;付</option>
						<option value="2" <?php if($page['pay_status'] == "2"){?>selected<?php }?>>支&nbsp;&nbsp;付&nbsp;&nbsp;中</option>
						<option value="3" <?php if($page['pay_status'] == "3"){?>selected<?php }?>>已&nbsp;&nbsp;支&nbsp;&nbsp;付</option>
						<option value="4" <?php if($page['pay_status'] == "4"){?>selected<?php }?>>支付失败</option>
						<option value="5" <?php if($page['pay_status'] == "5"){?>selected<?php }?>>已&nbsp;&nbsp;出&nbsp;&nbsp;游</option>
					</select>
				</td>
				<td>
					<ul>
						<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
					</ul>
				</td>
			</tr>
		</table>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" href="<?php echo Yii::app()->createUrl('order/delete');?>" class="delete" postType="string"><span>删除</span></a></li>
			<li><a class="edit" href="<?php echo Yii::app()->createUrl('order/edit');?>&id={sid_user}" target="dialog" rel="edit_order" title="编辑商品订单" mask="true" width="850" height="455"><span>修改</span></a></li>
			<li><a class="icon" href="<?php echo Yii::app()->createUrl('passenger/index');?>&pid={sid_user}" target="navTab" rel="passenger" title="订单游客查询" mask="true" width="850" height="455"><span>订单游客查询</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="113">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="80">订单号</th>
				<th width="80">商品名称</th>
				<th width="80">人数</th>
				<th width="80">总价</th>
				<th width="80">出游时间</th>
				<th width="80">过期时间</th>
				<th width="80">状态</th>
				
				<th width="80">添加时间</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach($list as $value){?>
			<tr target="sid_user" rel="<?php echo $value['order_id'];?>">
				<td><input name="ids" value="<?php echo $value['order_id'];?>" type="checkbox"></td>
				<td><?php echo $value['order_sn'];?></td>
				<td><?php echo $value['goods_name'];?></td>
				<td><?php echo $value['sell_num'];?></td>
				<td><?php echo $value['total_amount'];?></td>
				<td><?php if($value['travel_date'] != '0000-00-00 00:00:00'){?><?php echo date("Y-m-d", strtotime($value['travel_date']));?><?php }else{?>待定<?php }?></td>
				<td><?php echo $value['order_expire'];?></td>
				<td><?php if($value['is_travel'] == 1){?>已出游<?php }else if($value['pay_status'] == 0){?>未支付<?php }else if($value['pay_status'] == 1){?>支付中<?php }else if($value['pay_status'] == 2){?>支付成功<?php }else if($value['pay_status'] == 3){?>支付失败<?php }?></td>
				
				<td><?php echo $value['raw_add_time'];?></td>
			</tr>
			<?php }?>
		</tbody>
	</table>
	<?php $this->beginWidget('application.widget.tools.panelBar', 
	array(
	'currentPage'=>$page['current'], 
	'total'=>$page['total'],
	'numPerPage'=>$page['numPerPage'])); ?>
	<?php $this->endWidget(); ?>
</div>